package meihua.stopcarapp.ui;

import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import butterknife.Bind;
import butterknife.OnClick;
import meihua.mylibrary.base.BaseActivity;
import meihua.stopcarapp.R;
import meihua.stopcarapp.utils.ToastUtil;

/**
 * Name: LGZ
 * Time: 2017/5/12.
 * Dec:
 */

public class VerifyActivity extends BaseActivity {

    @Bind(R.id.toolbar_center)
    TextView toolbarCenter;
    @Bind(R.id.activity_verify_et_name)
    EditText activityVerifyEtName;
    @Bind(R.id.activity_verify_et_idcard)
    EditText activityVerifyEtIdcard;

    private String name;
    private String idcard;

    @Override
    public int getLayoutId() {
        return R.layout.activity_verify;
    }

    @Override
    public void initPresenter() {

    }

    @Override
    public void initView(Bundle savedInstanceState) {

    }

    @OnClick({R.id.toolbar_left, R.id.activity_deposit_btn})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.toolbar_left:
                finish();
                break;
            case R.id.activity_deposit_btn:
                name = activityVerifyEtName.getText().toString();
                idcard = activityVerifyEtIdcard.getText().toString();
                if ("".equals(name) || null == name || name.length()<=1 ||
                    "".equals(idcard) || null == idcard || idcard.length() <= 17){
                    ToastUtil.showShort(this,"请输入正确的姓名和身份证号");
                    return;
                }
                break;
        }
    }
}
